﻿using System;
using UniMana.Data;

namespace UniMana.Win.Leadership
{
    public partial class FrmLog_RemoveProfile_Censorship_Confirm : DevExpress.XtraEditors.XtraForm
    {
        private DBMain m_data = new DBMain();
        Log_RemoveProfileInfo profile = new Log_RemoveProfileInfo();

        public FrmLog_RemoveProfile_Censorship_Confirm(Log_RemoveProfileInfo profile)
        {
            InitializeComponent();
            this.profile = profile;
        }

        private void FrmLog_RemoveProfile_Censorship_Confirm_Load(object sender, EventArgs e)
        {
            lbcID.Text = profile.Properties.Log_RemoveProfileKey + " ?";
        }

        /// <summary>
        /// Đồng ý không phê duyệt
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void btnYes_Click(object sender, EventArgs e)
        {
            Log_RemoveProfileData.m_bFlag = true;
            profile.Properties.Feedback = rtbFeedback.Text;
            profile.Properties.Refuse = true;
            profile.Properties.Status = true;
            profile.Properties.CensorshipUser = UniMana.Utils.LoginInfo.GblLoginInfo.sysLoginUserKey;
            profile.Properties.CensorshipTime = SysDateTime.Now;
            profile.Save();
            this.Close();
        }

        /// <summary>
        /// Không đồng ý
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void btnNo_Click(object sender, EventArgs e)
        {
            Log_RemoveProfileData.m_bFlag = false;
            this.Close();
        }
    }
}
